#ifndef COMBOSYSTEM_H_
#define COMBOSYSTEM_H_
#include "CCombo.h"
#include <vector>
using std::vector;
#include "SGD Wrappers/CSGD_TextureManager.h"
class CPlayer;
class ComboSystem
{
private:
	vector<CCombo*>  m_vComboList;
	char m_chBuffer[ 20 ];
	char m_chTemp[ 10 ];
	char m_chLastButton;
	float m_fTimer;
	int m_nCount;
	int m_nCombo;
	bool m_bTimerStart;

	ComboSystem( void )
	{
		for( int i = 0 ; i < 20 ; ++i )
			m_chBuffer[ i ] = 0;
		for( int i = 0 ; i < 5 ; ++i )
			m_chTemp[ i ] = 0;
		m_nCount = 3;
		m_nCombo = 0;
		m_fTimer = 6.0f;
		m_bTimerStart = false;
	}
	
	ComboSystem( const ComboSystem& ){}
	ComboSystem& operator=( const ComboSystem& ){}
	~ComboSystem( void ) { }


public:
	// GetInstance
	// Returns a static instance of the class to gain access to all the functions
	static ComboSystem* GetInstance( void );
	// InitComboSystem
	// Loads in all the combos that the player can perform if their level is high enough.
	void InitComboSystem( void );
	// CheckComboInput
	// Holds all the inputs from the player and checks if the condition for starting a combo and continuing a combo 
	// are good.
	int CheckComboInput( char Buttons , string WeaponType, float fElapsedTime );
	// Update
	// Updates the combo system during idle states.
	void Update( float fElapsedTime );
	// Clear
	// Clears the combo buffer if good combo or been idle to long
	void Clear( void );
	// ShutdownComboSystem
	// When closing out the game play state will free up the memory storing the combo info.
	void ShutdownComboSystem( void );

	// Accessors
	vector<CCombo*> GetComboList( void ) { return m_vComboList; }
	bool GetTimerStart( void ) { return m_bTimerStart; }
	char GetLastButton( void ) { return m_chLastButton;}
	int GetComboDamage( void ) { return m_nCombo; }
	// Mutators
	void SetTimerStart( bool Start ) { m_bTimerStart = Start; }
	void SetLastButton( char chButton ) { m_chLastButton = chButton; }
	void SetComboDamage( int nDamage ) { m_nCombo = nDamage; }
};
#endif 